'''
1.
def fun():
	_str = input('输入4个数字，数字之间用单个英文逗号隔开：')
	arr = [int(e) for e in _str.split(',')]

	print('和为',sum(arr))

fun()
'''

'''
2. 
def fun2(arr):
	print('和为',sum(arr))

fun2([1,2,3,4,5])

'''

# 3.

# def fun3():
#     for i in range(1,10):
#         for j in range(1,i+1):
#             print('{}x{}={}'.format(j,i,i*j),end=' ')
#         print()
# fun3()

# 4
# def fun4(N):
#     for i in range(1, N+1):
#         for j in range(1, i + 1):
#             print('{}x{}={}'.format(j, i, i * j), end=' ')
#         print()
#
# fun4(16)
# 5.

# def fun5(arr,index):
#     if len(arr) <= index:
#         return -1
#     return arr[index]
#
# print(fun5([4,3,2,1],3))


# 6.
# def fun6(num):
#     if num > 1:
#         return num + fun6(num-1)
#     else:
#         return 1
# print(fun6(300))

# 7.
#
# cs = ['小明', '小张', '小黄', '小杨']
# yf = ['小黄', '小李', '小王', '小杨', '小周']
# sc = ['小杨', '小张', '小吴', '小冯', '小周']
#
# print(f'1. 总有人数为：{len(set(cs+yf+sc))}')
# map = {}
# def fun7(arr):
#     for e in arr:
#         map[e] = map.get(e, 0) + 1
# fun7(cs)
# fun7(yf)
# fun7(sc)
# ans = 0
# arr = []
# arr2 = []
# for k in map:
#     if map[k] == 1:
#         ans += 1
#         arr.append(k)
#     elif map[k] >= 2:
#         arr2.append(k)
# print(f'2. 只在一个部门的人数为：{ans},对应员工为：{".".join(arr)}')
# print(f'3. 3)在两个部门以及以上的人员有{",".join(arr2)}')


# 8 .
N = int(input('输入N：'))
for i in range(N,-1,-1):
    for j in range(1,i+1):
        print(f'{j}*{i}={i*j}',end=' ')
    print()

